<!DOCTYPE html>
<div ng-controller="giftLibraryCtrl">
	<div class="well">
		<div class="titleContainer">
			<div class="leftTitle">礼品库</div>
		</div>
		
		<div class="formContainer">
			<div class="form-horizontal">
				<div class="form-group">
					<div class="form-horizontal col-sm-4">
			            <div class="form-group">
			                <label class="col-sm-4 control-label">礼品等级</label>
			                <div class="col-sm-8">
			                	<input type="text" class="form-control" ng-model="search.grade"/>
			                </div>
			            </div>
			        </div>
			        <div class="form-horizontal col-sm-4">
			            <div class="form-group">
			                <label class="col-sm-4 control-label">礼品名称</label>
			                <div class="col-sm-8">
			                	<input type="text" class="form-control" ng-model="search.giftName"/>
			                </div>
			            </div>
			        </div>
			        <div class="form-horizontal col-sm-4" ng-show="creator_show">
			            <div class="form-group">
			                <label class="col-sm-4 control-label">创建者</label>
			                <div class="col-sm-8">
			                	<input type="text" class="form-control" ng-model="search.creator"/>
			                </div>
			            </div>
			        </div>
 		        
			       <div class="buttons-wrap clearBoth">
						<button class="k-button k-state-default" ng-click="search()">查询</button>
					</div>
				</div>
			</div>
		</div>
		
		<div class="operateContainer">
			<button class="k-button k-state-default" ng-click="chooseAll('recordClass',true)">全选</button>
			<button class="k-button k-state-default" ng-click="chooseAll('recordClass',false)">取消</button>
		 	<button class="k-button k-state-default" ng-click="downloadTableData(1)">筛选导出</button>
			<button class="k-button k-state-default" ng-click="downloadTableData(2)">选中导出</button>
			<span ng-show="addGift_show">
				<button class="k-button k-state-default" ng-click="openGiftWindow()" >添加礼品</button>
			</span>
		</div>
	
		<div class="tableList">
			<div kendo-grid="grid" k-options="gridOptions"></div>
		</div>
	</div>
	
	<div kendo-window="giftWindow" k-title="'礼品信息'" k-width="600" k-min-height="450" k-visible="false" k-modal="true">
		<div class="windowForm col-sm-11">
			<div class="form-horizontal">
		         <div class="form-group">
		             <label class="col-sm-2 control-label"></label>
		             <div class="col-sm-8">
		             	<div class="imgContainer">
			              	<div class="imgBackground1">
			              		<span class="glyphicon glyphicon-plus"></span>
			              	</div>
			              	<div class="imgBackground2" id="gift_img"></div>
			              	<input type="file" name="file" id="gift"/>
			              	<input type="hidden" id="gift_url"/>
		             	</div>		             	
		             </div>
		         </div>
		    </div>
		    <div class="form-horizontal">
		         <div class="form-group">
		             <label class="col-sm-2 control-label">礼品等级</label>
		             <div class="col-sm-8">
		             	<input type="text" class="form-control" ng-model="form.grade"/>
		             </div>
		         </div>
		    </div>
		    <div class="form-horizontal">
		         <div class="form-group">
		             <label class="col-sm-2 control-label">礼品名称</label>
		             <div class="col-sm-8">
		             	<input type="text" class="form-control" ng-model="form.name"/>
		             </div>
		         </div>
		    </div>
		    <div class="form-horizontal">
		         <div class="form-group">
		             <label class="col-sm-2 control-label">礼品价值</label>
		             <div class="col-sm-8">
		             	<input type="number" class="form-control" ng-model="form.value"/>
		             </div>
		         </div>
		    </div>
		    <div class="form-horizontal">
		         <div class="form-group">
		             <label class="col-sm-2 control-label">库存数量</label>
		             <div class="col-sm-8">
		             	<input type="number" class="form-control" ng-model="form.inventory"/>
		             </div>
		         </div>
		    </div>
		    <div class="buttons-wrap ">
				<button class="k-button k-state-default" ng-show="submit_show" ng-click="addGift()">确定</button>
			</div>
		</div>
	</div>
	
</div>